<?php

namespace Trawind\Events\Events;

abstract class BaseEvent
{

    /**
     * Parameter carrier
     *
     * @var array
     */
    public $payload;


    public function __construct(array $payload)
    {
        $this->payload = $payload;
        foreach ($this->payload as $property => $item) {
            property_exists(static::class, $property) and $this->$property = $item;
        }
    }

}